// 引入封装好的类
import http from '@/request'

/*------------------菜单------------------*/
// 菜单列表
export const menuList = () => http.get('/menulist', { istree: true })
// 菜单添加
export const menuAdd = (params: any) => http.post('/menuadd', params)
// 菜单获取（一条）
export const menuInfo = (params: any) => http.get('/menuinfo', params)
// 菜单修改
export const menuEdit = (params: any) => http.post('/menuedit', params)
// 菜单删除
export const menuDel = (params: any) => http.post('/menudelete', params)

/*------------------角色------------------*/
// 角色列表
export const roleList = () => http.get('/rolelist')
// 角色添加
export const roleAdd = (params: any) => http.post('/roleadd', params)
// 角色获取（一条）
export const roleInfo = (params: any) => http.get('/roleinfo', params)
// 角色修改
export const roleEdit = (params: any) => http.post('/roleedit', params)
// 角色删除
export const roleDel = (params: any) => http.post('/roledelete', params)



/*------------------角色------------------*/
// 管理员添加
export const userAdd = (params: any) => http.post('/useradd', params)
// 管理员总数（用于计算分页）
export const userCount = () => http.get('/usercount')
// 管理员列表（分页）
export const userList = (params: any) => http.get('/userlist', params)
// 管理员获取（一条）
export const userInfo = (params: any) => http.get('/userinfo', params)
// 管理员修改
export const userEdit = (params: any) => http.post('/useredit', params)
// 管理员删除
export const userDel = (params: any) => http.post('/userdelete', params)
// 管理员登录
export const userLogin = (params: any) => http.post('/userlogin', params)